//
//  HJOrderCell.m
//  YaDiuDiu
//
//  Created by 胡光健 on 2017/10/29.
//  Copyright © 2017年 jy. All rights reserved.
//

#import "HJOrderCell.h"
#import "HJGetOnModel.h"
@interface HJOrderCell()
@property (weak, nonatomic) IBOutlet UILabel *oderNum;
@property (weak, nonatomic) IBOutlet UILabel *num;
@property (weak, nonatomic) IBOutlet UILabel *shopName;
@property (weak, nonatomic) IBOutlet UILabel *time;
@property (weak, nonatomic) IBOutlet UILabel *money;

@end
@implementation HJOrderCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.btn.layer.cornerRadius = 5;
    self.btn.layer.masksToBounds = YES;
    self.btn.layer.borderWidth = 1;
    self.btn.layer.borderColor = COLOR_RGB(253, 17, 65, 1.0).CGColor;
}

-(void)setModel:(HJOrderModel *)model {
    _model = model;
    self.oderNum.text = [NSString stringWithFormat:@"订单号：%@",model.ordernumber];
    self.shopName.text = model.ordername;
    self.time.text = [TZHttpTool getNewDate:model.addtime];
   
    self.money.text = [NSString stringWithFormat:@"%@元",model.ordermoney];
    
    
}
- (IBAction)orderReceiving:(UIButton *)sender {
    if (self.block) {
        self.block(_model.merchant_id,_model.chargesum,_model.ischarge);
    }
    
}

@end
